<?php
/**
 * @version     $Id: default_banip.php 3 2010-10-08 17:49:35Z obalyuk87@gmail.com $
 * @package     AdminSafe
 * @subpackage  Components
 * @author      Oleksandr Balyuk <obalyuk@boolcast.com>
 * @copyright   Copyright (C) 2010 Oleksandr Balyuk (www.boolcast.com)
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL v2
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
?>

<script type="text/javascript">
    function tryToSubmit(){
        var obj = document.getElementById('ip_address');
        if (obj.value.length > 9){
            submitbutton('apply');
        }else{
            alert('<?php echo JText::_('Invalid IPv4 Address'); ?>');
            obj.focus();
        }
    }
</script>


<fieldset>
    <legend><?php echo JText::_('Ban IP'); ?></legend>

    <table>
        <tbody>
            <tr>
                <th><?php echo JText::_('IP Address'); ?></th>
                <td><input type="text" id="ip_address" name="ip_address" value="" size="15"/></td>
                <td><input type="button" value="Ban" onclick="javascript:tryToSubmit()"/></td>
            </tr>
        </tbody>

    </table>
</fieldset>